let myAuto = document.getElementById('myaudio');
let flag = false;

function closePlay() {

    let musics = document.querySelectorAll('.music-icon');
    if (flag == false) {
        for (let i = 0; i < musics.length; i++) {
            musics[i].src = '../img/自转动图/小图标圈圈(1).gif'
        }
        console.log("音乐开始");
        myAuto.play();
        flag = true;
    } else {
        console.log("音乐停止");
        for (let i = 0; i < musics.length; i++) {
            musics[i].src = '../img/img/disc.png'
        }
        myAuto.pause();
        myAuto.load();
        flag = false;
    }

}

